<?php
exit;
$isLock=true;
if (isset($_GET['key'])){
    if ('mf$%^op01z' == $_GET['key']){
        
    }else{
        exit;
    }
}else{
    exit;
}

$endTime=strtotime("2021-04-21 17:00:00");
$cha=$endTime - time();
$m = floor(($cha%(3600*24))%3600/60);
$s = floor(($cha%(3600*24))%60);
if ($m < 1){$m=0;}
if ($s < 1){$s=0;}

//$url='.';
$url='https://tu-10030004.file.myqcloud.com/szds';
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>上海</title>
<style>
html,body{font-size:16px;background:#fbe899;width:100%;font-size:12px;color:#000000;font-family:Microsoft YaHei, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
body, div{position:relative;padding:0px;margin:0px auto;max-width:750px;}
.weui-dialog{position:fixed;z-index:5000;width:80%;max-width:300px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#FFF;text-align:center;border-radius:3px;overflow:hidden}.weui-dialog__hd{padding:1.3em 1.6em .5em}.weui-dialog__title{font-weight:400;font-size:18px}.weui-dialog__bd{padding:0 1.6em .8em;min-height:40px;font-size:15px;line-height:1.3;word-wrap:break-word;word-break:break-all;color:#999}.weui-dialog__bd:first-child{padding:1.2em 20px .1em;color:#353535}.weui-dialog__ft{position:relative;line-height:48px;font-size:18px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3CC51F;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative}.weui-dialog__btn:active{background-color:#EEE}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:#353535}.weui-dialog__btn_primary{color:#0BB20C}@media screen and (min-width:1024px){.weui-dialog{width:35%}}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6)}
.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}
.js_dialog{display:none;}
.weui-toast {position: fixed;z-index: 5000;width: 7.6em;min-height: 7.6em;top: 180px;left: 50%;margin-left: -3.8em;background: rgba(17, 17, 17, 0.7);text-align: center;border-radius: 5px;color: #FFFFFF;}
.weui-toast__content {
    margin: 0 0 15px;
}
-webkit-touch-callout:none;
-webkit-user-select:none;
html{-ms-touch-action:none;}
div,img{-webkit-tap-highlight-color:rgba(0,0,0,0);}
*{-webkit-text-size-adjust: none;}
.simg{position:absolute;display:block;}
a{text-decoration:none;}
.txt{position:absolute;text-indent:8px;font-size:12px;z-index:2;border:none;background:transparent;}
.txt::-webkit-input-placeholder {color:#a0a09b;text-align:left;}
input {
    outline:none;
    border:none;
    outline-color: "red";
    -webkit-transform: translate3d(0, 0, 0);
}
select{position:absolute;display:block;background:transparent;border:0px;text-indent:8px;font-size:12px;-webkit-appearance:none;}
input:-internal-autofill-selected, .txt:-internal-autofill-selected{background:transparent;}
.container{position:relative;width:100%;height:auto;overflow-x:hidden;}
.p1{opacity:0;background:transparent url('<?php echo $url; ?>/img/index-bg.jpg?v=2') no-repeat;background-size:cover;}
.p2{background:transparent url('<?php echo $url; ?>/img/tmtip.jpg') no-repeat;background-size:cover;}
.p3{background:transparent url('<?php echo $url; ?>/img/tmtip.jpg') no-repeat;background-size:cover;}
.tkong-t2{position:absolute;background:transparent url('<?php echo $url; ?>/img/tkong-t2.png') no-repeat;background-size:cover;}
.tktip{background:transparent url('<?php echo $url; ?>/img/tmtip.jpg') no-repeat;background-size:cover;}
.tkong{background:transparent url('<?php echo $url; ?>/img/tmtip.jpg') no-repeat;background-size:cover;}
.p2-txt{position:absolute;font-size:13px;text-align:center;color:#000;}
.fade-in{opacity:1;-webkit-transition:opacity 1s ease-in-out;-moz-transition: opacity 1s ease-in-out;-o-transition: opacity 1s ease-in-out;transition: opacity 1s ease-in-out;}
.p-bg{top:0px;left:0px;}
.l100{position:absolute;width:100%;left:0;display:block;}
.end-pop-t1{top:35%;background:transparent url('<?php echo $url; ?>/img/end.png') no-repeat;background-size:cover;}
.end-pop-t1 img{width:100%;display:block;}
.end-pop-close{position:absolute;width:60%;height:35%;left:20%;top:56%;}
.p-b, .thebg{position:absolute;width:100%;top:0;left:0;} 
.t-bg{position:absolute;display:none;width:100%;height:100%;top:0;left:0;background-color:#000;opacity:.8;z-index:9;}
.page{position:absolute;display:none;width:100%;height:100%;top:0;left:0;}
.p-top{top:0;z-index:2;}
.p-botm{bottom:0;z-index:2;}
.ti-title{position:absolute;font-size:16px;width:100%;text-align:center;font-weight:700;}
.tk-bt, .dx-bt, .duox-bt, .pduan-bt{position:absolute;width:80%;left:10%;font-size:12px;line-height:24px;}
.ti-timedt{font-size:22px;}
.ti-timedj{font-size:24px;}
.ti-timedt, .ti-timedj{position:absolute;color:#df0c12;font-weight:700;}
.dx-abcd, .duox-abcd, .pduan-abcd{position:absolute;width:90%;left:8%;}
.dx-li{position:relative;width:100%;font-size:12px;vertical-align:middle;}
.dx-li-ico{position:absolute;}
.pduan-li{position:absolute;top:0;}
.pduan-a{left:0;}
.pduan-b{left:45%;}
.hide{display:none;}
.end-pop, .endtime-pop{position:absolute;z-index:9;display:none;width:100%;height:100%;background:rgba(0, 0, 0, 0.8);;top:0px;left:0px;}
@media only screen and (max-width: 480px) {
    .ti-title{font-size:16px;}
}
.tktxt{text-align:center;background:transparent;font-size:12px;color:red;
    width: 38px;
    margin: 9px 2px;
    height: 38px;
    line-height: 38px;
    border: 1px solid #ecca0f;
    border-radius: 5px;
}
@media only screen and (min-width: 740px) {
    .txt, .p2-txt{font-size:16px;font-weight:600;}
    .ti-title{font-size:40px;}
    .tk-bt, .dx-bt, .duox-bt, .pduan-bt{width:78%;left:11%;font-size:20px;line-height:38px;}
    .tktxt{font-size:20px;width: 40px;margin: 10px 5px;height: 40px;line-height: 40px;border: 1px solid #ecca0f;border-radius: 5px;}
    .ti-timedt{font-size:40px;}
    .ti-timedj{font-size:42px;}
    .dx-li{font-size:18px;}
}
.p3-li{position:absolute;overflow-y:scroll;}
.p3-li img{width:100%;display:block;}
.p3-li::-webkit-scrollbar {width: 4px;}
.p3-li::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background   : #8b8385;
}
.p3-li::-webkit-scrollbar-track {
border-radius: 4px;
background   : #ededed;
}
.p1-jr{z-index:6;}
</style><script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?44b765fb3fae570023be4ed95e891158";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script></head>
<body>
<div class="container">
  <div class="p1 page">
      <img class="l100 p-top" src="<?php echo $url; ?>/img/index-b1.png" />
      <img class="l100 p-botm" src="<?php echo $url; ?>/img/index-b2.png" />
      <div class="thebg">
        <img class="p-b" src="<?php echo $url; ?>/img/index.png?v=2" />
        <input id="p1-name" class="txt" name="p1-name" type="text" value="" placeholder="请填写学生姓名" />
        <input id="p1-idcard" autocomplete="off" class="txt" name="p1-idcard" type="text" value="" placeholder="请填写身份证号或有效证件" />
        <div class="p1-jr simg"></div>
     </div>
  </div>
  
  <div class="p2 page">
     <div class="thebg">
      <img class="p-b" src="<?php echo $url; ?>/img/xin.png" />
      <div class="p2-qu p2-txt"></div>
      <div class="p2-school p2-txt"></div>
      <div class="p2-nianji p2-txt"></div>
      <div class="p2-name p2-txt"></div>
      <div class="p2-id p2-txt"></div>
      <div class="p2-phone p2-txt"></div>
      <div class="p2-jr simg"></div>
     </div>
  </div>
  <div class="p3 page">
     <div class="thebg">
         <img class="p-b" src="<?php echo $url; ?>/img/zhi.png" />
         <div class="p3-li">
            <img src="<?php echo $url; ?>/img/p3-t1.png" />
         </div>
         <img class="l100 p-top" src="<?php echo $url; ?>/img/p3-niao.png" />
         <div class="p3-jr simg"></div>
     </div>
  </div>
  
  <div class="tktip page">
    <div class="thebg">
     <img class="p-b" src="<?php echo $url; ?>/img/tmtip.png" />
     <img class="l100 p-top" src="<?php echo $url; ?>/img/tktip-t1.png" />
     <div class="tmtip-b1 simg go-tkong"></div>
    </div> 
  </div>
  
  <div class="dxtip page">
    <div class="thebg">
     <img class="p-b" src="<?php echo $url; ?>/img/tmtip.png" />
     <img class="l100 p-top" src="<?php echo $url; ?>/img/dxtip-t1.png" />
     <div class="tmtip-b1 simg go-danxuan"></div>
    </div> 
  </div>
  <div class="pduantip page">
    <div class="thebg">
     <img class="p-b" src="<?php echo $url; ?>/img/tmtip.png" />
     <img class="l100 p-top" src="<?php echo $url; ?>/img/pduantip-t1.png" />
     <div class="tmtip-b1 simg go-pduan"></div>
    </div> 
  </div>
  <div class="duotip page">
    <div class="thebg">
     <img class="p-b" src="<?php echo $url; ?>/img/tmtip.png" />
     <img class="l100 p-top" src="<?php echo $url; ?>/img/duotip-t1.png" />
     <div class="tmtip-b1 simg go-duo"></div>
    </div> 
  </div>
  
  <div class="panduan page">
    <div class="thebg">
      <img class="p-b" src="<?php echo $url; ?>/img/tkong.png?v=2" />
      <img class="tkong-t1 simg" src="<?php echo $url; ?>/img/tkong-t1.png" />
      <div class="tkong-t2"></div>
      <img class="l100 p-top" src="<?php echo $url; ?>/img/tkong-niao.png" />
      <div class="ti-timedt">01:27</div>
      <div class="ti-timedj">15s</div>
      <div class="ti-title">第一题 （1/20）</div>
      <?php 
      include './template/pan.php';
      ?>
      <div class="pduan-abcd">
        <div class="pduan-li pduan-a" data-id="y"><img class="dx-li-ico pduan-li-a" src="<?php echo $url; ?>/img/a.png" /> <span>正确</span></div>
        <div class="pduan-li pduan-b" data-id="n"><img class="dx-li-ico pduan-li-b" src="<?php echo $url; ?>/img/b.png" /> <span>错误</span></div>
      </div>
      
      <div class="pduan-next simg"></div>

    </div>
  </div>
  
  <div class="duoxt page">
     <div class="thebg">
      <img class="p-b" src="<?php echo $url; ?>/img/tkong.png?v=2" />
      <img class="tkong-t1 simg" src="<?php echo $url; ?>/img/tkong-t1.png" />
      <div class="tkong-t2"></div>
      <img class="l100 p-top" src="<?php echo $url; ?>/img/tkong-niao.png" />
      <div class="ti-timedt">01:27</div>
      <div class="ti-timedj">20s</div>
      <div class="ti-title">第一题 （1/20）</div>
      <!--  题目内容  -->
      <?php 
      include './template/duo.php';
      ?>
      <div class="duo-next simg"></div>
    </div>
  </div> <!-- 多选题结束  -->
  
  <div class="danxt page">
     <div class="thebg">
      <img class="p-b" src="<?php echo $url; ?>/img/tkong.png?v=2" />
      <img class="tkong-t1 simg" src="<?php echo $url; ?>/img/tkong-t1.png" />
      <div class="tkong-t2"></div>
      <img class="l100 p-top" src="<?php echo $url; ?>/img/tkong-niao.png" />
      <div class="ti-timedt">01:27</div>
      <div class="ti-timedj">15s</div>
      <div class="ti-title">第一题 （1/40）</div>
      <!--  题目内容  -->
      <?php
       include './template/dx.php'; 
      ?>
      <div class="dx-next simg"></div>
    </div>
  </div> <!-- 单选题结束  -->
  
  <div class="tkong page">
    <div class="thebg">
      <img class="p-b" src="<?php echo $url; ?>/img/tkong.png?v=2" />
      <img class="tkong-t1 simg" src="<?php echo $url; ?>/img/tkong-t1.png" />
      <div class="tkong-t2"></div>
      <img class="l100 p-top" src="<?php echo $url; ?>/img/tkong-niao.png" />
      <div class="ti-timedt">01:27</div>
      <div class="ti-timedj">25s</div>
      <div class="ti-title">第一题 （1/20）</div>
      <!--  题目内容  -->
      <?php 
       include_once './template/tkong.php';
      ?>
      <!-- 题目内容  end  -->
      <div class="tkong-next simg"></div>
    </div>
  </div>

  <div class="end-pop">
      <div class="end-pop-t1 l100">
         <img src="<?php echo $url; ?>/img/end.png" />
         <div class="end-pop-close"></div>
      </div>
  </div>
  
  <div class="endtime-pop">
      <div class="end-pop-t1 l100">
         <img src="<?php echo $url; ?>/img/time-end.png" />
      </div>
  </div>
  
  <div class="js_dialog">
       <div class="weui-mask"></div>
       <div class="weui-dialog">
                <div class="weui-dialog__bd weui-msg"></div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary weui-btn">知道了</a>
                </div>
        </div>
  </div>
  
</div>
<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.0.0/jquery.min.js"></script>
<script>
_h=h= Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var sWidth = parseInt((window.innerWidth > 0) ? window.innerWidth : screen.width);
if(sWidth>750){sWidth=750;}
var _rate=(sWidth/750);
if(h<_rate*1246){
	h=_rate*1246;
}
function setKe(cname, cvalue){
	var cname='v7'+cname;
	
    var d = new Date();
    d.setTime(d.getTime() + (23*60*60*1000));
    var expires = "expires="+ d.toUTCString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getke(cname) {
	var cname='v7'+cname;
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
         }
         if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
         }
     }
    return "";
}
var endDate = new Date();
var min=endDate.getMinutes();
//endDate.setMinutes(min+30);

endDate.setMinutes(min+<?php echo $m; ?>);
endDate.setSeconds(min+<?php echo $s; ?>);
//end = endDate.getTime();
end = endDate.getTime();
function chinanum(num){
    var china = new Array('零','一','二','三','四','五','六','七','八','九');  
    var arr = new Array();
    var num=num+'';
    var english = num.split("")  
    for(var i=0;i<english.length;i++){
        arr[i] = china[english[i]];
    }
    if(2 == english.length){
        if('一' == arr[0]){
        	return ('十'+arr[1]);
        }else{
        	return (arr[0]+'十'+arr[1]);
        }
    }else{
    	return arr.join("")  
    }
}
Array.prototype.shuffle = function(){
	  let array = this;
	  let len = array.length;
	  for (let i = len - 1; i > 0; i--) {
	    let j = Math.floor(Math.random() * (i + 1));
	    [array[i], array[j]] = [array[j], array[i]];
	  }
}
function isMobile() {
	  return (/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|webOS|android/i.test(navigator.userAgent))
}
var _isMobile=isMobile();
var _hasPostTkong=false;
var _hasPostPan=false;
var _hasPostDan=false;
var _hasPostDuo=false;
$(function(){
	$(".p1").show().addClass("fade-in");
	$('.container, .page').width(sWidth).height(h);
	$('.p-b').height(_rate*1206);
	$('#p1-name').width(_rate*400).height(_rate*60).css({"top":_rate*772, "left":_rate*172});
	$('#p1-idcard').width(_rate*400).height(_rate*60).css({"top":_rate*916, "left":_rate*172});
	$('.p1-jr').width(_rate*248).height(_rate*82).css({"top":_rate*1010, "left":_rate*250});
	$('.p2-txt').width(_rate*396).height(_rate*70).css({"left":_rate*248, "line-height":_rate*70+'px'});
	$('.p2-qu').css({"top":_rate*402});
	$('.p2-school').css({"top":_rate*506});
	$('.p2-nianji').css({"top":_rate*610});
	$('.p2-name').css({"top":_rate*704});
	$('.p2-id').css({"top":_rate*798});
	$('.p2-phone').css({"top":_rate*898});
	$('.p2-jr').width(_rate*248).height(_rate*82).css({"top":_rate*1040, "left":_rate*250});
	$('.p3-li').width(_rate*646).height(_rate*880).css({"top":_rate*140, "left":_rate*48});
	$('.p3-jr').width(_rate*248).height(_rate*82).css({"top":_rate*1040, "left":_rate*250});
	$('.tmtip-b1').width(_rate*248).height(_rate*112).css({"top":_rate*1020, "left":_rate*250});
	$('.ti-title').css({"top":_rate*240});
	$('.tk-bt').css({"top":_rate*460});
	$(".tk-1").width(_rate*60);
	$('.ti-timedt').height(_rate*110).css({"top":_rate*20, "left":_rate*132,'line-height':_rate*110+'px'});
	$('.ti-timedj').height(_rate*110).css({"top":_rate*64, "left":_rate*400,'line-height':_rate*110+'px'});
	$('.tkong-t1, .tkong-t2').width(_rate*535).height(_rate*30).css({"top":_rate*152, "left":_rate*94});
	$('.tkong-t2').width(0);
	$('.tkong-next, .dx-next, .duo-next, .pduan-next').width(_rate*248).height(_rate*102).css({"top":_rate*1000, "left":_rate*250});
	$('.pduan-bt').css({"top":_rate*340});
	$('.dx-bt').css({"top":_rate*300});
	$('.duox-bt').css({"top":_rate*300});
	$('.dx-abcd, .pduan-abcd').height(_rate*90).css({"top":_rate*590});
	$('.duox-abcd').height(_rate*90).css({"top":_rate*590});
	$('.dx-li, .pduan-li').height(_rate*70).css({"line-height":_rate*70+'px','margin-bottom':_rate*35});
	$('.dx-li-ico').width(_rate*53).height(_rate*48).css({"top":_rate*16, "left":_rate*0});
	$('.dx-li span, .pduan-li span').css({"margin-left":_rate*66});
	if(h > _rate*1206){
		   var _cha= h - _rate*1246;
		   if(_cha > 0){
		      $('.thebg').css({"top":_cha/3});
		   }
	}

	var _zhongwen='我';
	var _maxLength=_zhongwen.length;
	if(_maxLength > 1){
      $(".tktxt").attr("maxlength", _maxLength);
	}
	 
	var _szuid=getke('sz_v1uid');
	var _szvtd=getke('sz_v1td');
	var _ershiShuffleCookie=getke('sz_ershiShuffle');
	var _sisShuffleCookie=getke('sz_sisShuffle');
	var _userCurStepCookie=getke('sz_userCurStep');
	_ershiShuffleCookie='';
 

	$('.p1-jr').click(function(){
       var _name=$("#p1-name").val();
       var _idcard=$("#p1-idcard").val();
       if('' == _name){
    	   _popMsg("请输入学生姓名");
           return;  
       }
       if('' == _idcard){
    	   _popMsg("请输入身份证");
           return;  
       }
       $.post("./api/?c=getu", {n:_name,idc:_idcard}, function(data){
           if('n' == data.s){
        	   _popMsg("未查询到您的身份信息");
               return; 
           }
           if('l' == data.s){
        	   _popMsg("您的账号已被登入");
               return; 
           }
           if('y' == data.s){
        	   $(".p1").hide();
               $(".p3").fadeIn(800);
               
               $('.p2-qu').html(data.u.qu);
           	   $('.p2-school').html(data.u.school);
           	   $('.p2-nianji').html(data.u.nianji);
           	   $('.p2-name').html(data.u.name);
           	   $('.p2-id').html(data.u.idcard);
           	   $('.p2-phone').html(data.u.phone);
                 console.log(data)
    			 console.log(data.s)
    			 _szuid=data.u.id;
	             _szvtd=data.u.vt;
    			 setKe('sz_v1td', data.u.vt);
                 setKe('sz_v1uid', data.u.id);
                 $.post("./api/?c=dolock", {vtd:_szvtd,uid:_szuid}, function(data){
                 }, "json");
           }
	   }, "json");
	});


	

	var _tmTimeId=26;
	var _tmTMType='tkong';
	
	function TMcount(){
		_tmTimeId--;
		if('stop' == _tmTMType){
           return;
		}
		if(_tmTimeId < 1){
			$(".ti-timedj").html('0s');
			if('tkong' == _tmTMType){
				_tmTimeId=26;
				_tkongGoNext();
				window.setTimeout(function(){
					TMcount();
					}, 1000);
				$(".endtime-pop").show();
				window.setTimeout(function(){$(".endtime-pop").hide();}, 800);
		    }
			if('danxt' == _tmTMType){
				_tmTimeId=16;
				_dxtmGoNext();
				window.setTimeout(function(){
					TMcount();
					}, 1000);
				$(".endtime-pop").show();
				window.setTimeout(function(){$(".endtime-pop").hide();}, 800);
			}
			if('duoxt' == _tmTMType){
				_tmTimeId=21;
				_duoxtmGoNext();
				window.setTimeout(function(){
					TMcount();
					}, 1000);
				$(".endtime-pop").show();
				window.setTimeout(function(){$(".endtime-pop").hide();}, 800);
		    }

			if('panduan' == _tmTMType){
				_tmTimeId=16;
				_panduanGoNext();
				window.setTimeout(function(){
					TMcount();
					}, 1000);
				$(".endtime-pop").show();
				window.setTimeout(function(){$(".endtime-pop").hide();}, 800);
			}
 
			return;
		}
		$(".ti-timedj").html(_tmTimeId+'s');
		window.setTimeout(function(){
			TMcount();
			}, 1000);
    }

	
	var _NextTkId=1;
	var _NextLock=true;

	var _tmKeyCookie=[];
	var _tmValCookie=[];
	
	var _tkData=[];
	if('' == _ershiShuffleCookie){
		var _esShuffle=[];
	    for(var i=1;i<=20;i++){
	    	_esShuffle.push(i);
	    }
	    //_esShuffle.shuffle();
	    setKe('sz_ershiShuffle', _esShuffle);
	}else{
		var _esShuffle=_ershiShuffleCookie.split(",");
	}
    console.log(_esShuffle);
    var _sisShuffle=[];
    if('' == _sisShuffleCookie){
        for(var i=1;i<=40;i++){
        	_sisShuffle.push(i);
        }
        //_sisShuffle.shuffle();
        setKe('sz_sisShuffle', _sisShuffle);
    }else{
    	_sisShuffle=_sisShuffleCookie.split(",");
    }
    console.log(_sisShuffle);

    
    function _post_tkong(){
    	$.post("./api/?c=settkong", {tm:_tkData,vtd:_szvtd}, function(data){
        	if('y' == data.s){
        		_hasPostTkong=true;
            }
        }, "json");
    }
    function _post_panduan(){
    	$.post("./api/?c=setpduan", {tm:_pduanData,vtd:_szvtd}, function(data){
    		setKe('sz_userCurStep', 'isend');
    		if('y' == data.s){
    			_hasPostPan=true;
            }
        }, "json");
    }
    function _post_dxtm(){
    	$.post("./api/?c=setdx", {tm:_dxData,vtd:_szvtd}, function(data){
    		if('y' == data.s){
    			_hasPostDan=true;
            }
        }, "json");
    }
    function _post_duoxtm(){
    	$.post("./api/?c=setduo", {tm:_duoData,vtd:_szvtd}, function(data){
    		if('y' == data.s){
    			_hasPostDuo=true;
            }
        }, "json");
    }
    //填空第一题
    var _lastTiId=_esShuffle[0];
    $(".tk-t"+_esShuffle[0]).show();
    function _tkongGoNext(){
    	_NextLock=false;
		_NextTkId++;
		var _lastTiId=_esShuffle[_NextTkId-2];
		var _numZi=$(".tk-t"+_lastTiId).attr("data-n");
		var _lastTiVal=$(".tk-t"+_lastTiId+" .tk-txt1").val();
		_lastTiVal+=$(".tk-t"+_lastTiId+" .tk-txt2").val();
		if(_numZi > 2){
		  _lastTiVal+=$(".tk-t"+_lastTiId+" .tk-txt3").val();
		}
		if(_numZi > 3){
		  _lastTiVal+=$(".tk-t"+_lastTiId+" .tk-txt4").val();
		}
		var _setArr={};
		_setArr[_lastTiId]=_lastTiVal;
        _tkData.push(_setArr);
        console.log(_tkData);
        
        _tmKeyCookie.push(_lastTiId);
        _tmValCookie.push(_lastTiVal.replace(/,/g, " "));
        setKe('sz_tmData', _tmValCookie);
        setKe('sz_tmKey', _tmKeyCookie);
      
        
		var _zwen=chinanum(_NextTkId);  
		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/20）");
		$(".tk-t"+ _esShuffle[_NextTkId-2]).hide();
		$(".tk-t"+ _esShuffle[_NextTkId-1] ).show();
		if(21 == _NextTkId){
			$(".tkong").hide();
			$(".dxtip").fadeIn();
			console.log(_tkData);
			_tmTMType='stop';
			_tmTimeId=0;
			setKe('sz_tmData', []);
			setKe('sz_tmKey', []);
			setKe('sz_userCurStep', 'dxtm');
			_post_tkong();
	    }else{
	    	_tmTimeId=26;
	    	$(".ti-timedj").html('25s');
	    	window.setTimeout(function(){_NextLock=true;}, 120);
	    	setKe('sz_userCurStep', 'tkong');
	    	
	    	_setKeyUp(_esShuffle[_NextTkId-1],_NextTkId);
		}
		
    }
	$(".tkong-next").click(function(){
		if(false == _NextLock){return;}
		_tkongGoNext();
	});

	
	var _dxData=[];
    var _curTiId=1;
    var _curTiVal='';
    $('.go-danxuan').click(function(){
		_NextTkId=1;
		_dxData=[];
	    _curTiId=_sisShuffle[0];
	    _curTiVal='';
	    $(".dx-t"+ _sisShuffle[0]).show();
	    var _zwen=chinanum(_NextTkId);  
		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/40）");
		window.setTimeout(function(){_NextLock=true;}, 100);
        $(".dxtip").hide();
        _tmKeyCookie=[];
    	_tmValCookie=[];
        $(".ti-timedj").html('15s');
        _tmTimeId=15;
        $(".danxt").fadeIn(function(){
        	_tmTMType='danxt';
        	TMcount();
         });
	});
    function _dxtmGoNext(){
    	_NextLock=false;
		_NextTkId++;
		var _zwen=chinanum(_NextTkId);  
		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/40）");
		_resetDx();
		$(".dx-t"+ _sisShuffle[_NextTkId-2]).hide();
		$(".dx-t"+ _sisShuffle[_NextTkId-1] ).show();
		var _setArr={};
		_setArr[_sisShuffle[_NextTkId-2]]=_curTiVal;
		_dxData.push(_setArr);
		console.log(_dxData);
		_tmKeyCookie.push(_sisShuffle[_NextTkId-2]);
		_tmValCookie.push(_curTiVal);
		setKe('sz_tmData', _tmValCookie);
		setKe('sz_tmKey', _tmKeyCookie);
		
		_curTiVal='';
		if(41 == _NextTkId){
			_post_dxtm();
			_tmTMType='stop';
			_tmTimeId=0;
			$(".danxt").hide();
            $(".duotip").show();
			console.log(_dxData);
			setKe('sz_userCurStep', 'duoxtm');
			setKe('sz_tmData', []);
			setKe('sz_tmKey', []);
	    }else{
	    	_tmTimeId=16;
	    	$(".ti-timedj").html('15s');
	    	window.setTimeout(function(){_NextLock=true;}, 10);
	    	if(false == _hasPostTkong){
	    		_post_tkong();
		    }
		}
    }
	$(".dx-next").click(function(){ //单选
		if(false == _NextLock){return;}
		_dxtmGoNext();
	});

	function _resetDx(){
		$(".dx-li-a").attr("src","./img/a.png");
	    $(".dx-li-b").attr("src","./img/b.png");
	    $(".dx-li-c").attr("src","./img/c.png");
	    $(".dx-li-d").attr("src","./img/d.png");
	}
	$(".dx-abcd .dx-li").click(function(){
       var _id=$(this).attr("data-id");
       _curTiVal=_id;
       _resetDx();
       if('a' == _id){
    	   $(".dx-li-a").attr("src","./img/a-r.png");
       }
       if('b' == _id){
    	   $(".dx-li-b").attr("src","./img/b-r.png");
       }
       if('c' == _id){
    	   $(".dx-li-c").attr("src","./img/c-r.png");
       }
       if('d' == _id){
    	   $(".dx-li-d").attr("src","./img/d-r.png");
       }
       console.log(_id);
	});

	

	var _duoData=[];
    $('.go-duo').click(function(){
        $(".duox-t"+ _esShuffle[0]).show();
        var _curTiId=_esShuffle[0];
        _NextTkId=1;
        var _zwen=chinanum(_NextTkId);  
		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/20）");
        _NextLock=true;
        _tmKeyCookie=[];
    	_tmValCookie=[];
        $(".duotip").hide();
        $(".ti-timedj").html('20s');
        _tmTimeId=20;
        $(".duoxt").fadeIn(function(){
        	_tmTMType='duoxt';
         	TMcount();
        });
	});


    
    function _duoxtmGoNext(){
    	_NextLock=false;
		_NextTkId++;
		var _zwen=chinanum(_NextTkId);  
		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/20）");
		_resetDx();
		$(".duox-t"+ _esShuffle[_NextTkId-2]).hide();
		$(".duox-t"+ _esShuffle[_NextTkId-1] ).show();
		var _setArr={};
		_setArr[_esShuffle[_NextTkId-2]]=_getABCD();
		_duoData.push(_setArr);
		
		_tmKeyCookie.push(_esShuffle[_NextTkId-2]);
		_tmValCookie.push(_getABCD());
		setKe('sz_tmData', _tmValCookie);
		setKe('sz_tmKey', _tmKeyCookie);
		
	    _duoxABCD={a:'',b:'',c:'',d:''};
	    if(21 == _NextTkId){
	    	_post_duoxtm();
			_tmTMType='stop';
			_tmTimeId=0;
		  $(".duoxt").hide();
		  $(".pduantip").show();
			console.log(_duoData);
			setKe('sz_userCurStep', 'pduan');
			setKe('sz_tmData', []);
			setKe('sz_tmKey', []);
	    }else{
	    	_tmTimeId=21;
	    	$(".ti-timedj").html('20s');
	    	window.setTimeout(function(){_NextLock=true;}, 10);
	    	if(false == _hasPostDan){
	    		_post_dxtm();
		    }
		}
    }
	$(".duo-next").click(function(){ //多选
		if(false == _NextLock){return;}
		_duoxtmGoNext();
	});
	var _duoxABCD={a:'',b:'',c:'',d:''};
	$(".duox-abcd .dx-li").click(function(){
       var _id=$(this).attr("data-id");
       _curTiVal=_id;
       if('a' == _id){
    	   _duoxABCD['a']=1
    	   $(".dx-li-a").attr("src","./img/a-r.png");
       }
       if('b' == _id){
    	   _duoxABCD['b']=1
    	   $(".dx-li-b").attr("src","./img/b-r.png");
       }
       if('c' == _id){
    	   _duoxABCD['c']=1
    	   $(".dx-li-c").attr("src","./img/c-r.png");
       }
       if('d' == _id){
    	   _duoxABCD['d']=1
    	   $(".dx-li-d").attr("src","./img/d-r.png");
       }
	   console.log(_duoxABCD);
	});
	function _getABCD(){
	      var _data='';
	      if(1 == _duoxABCD.a){
	    	  _data+='a';
	      }
	      if(1 == _duoxABCD.b){
	    	  _data+='b';
	      }
	      if(1 == _duoxABCD.c){
	    	  _data+='c';
	      }
	      if(1 == _duoxABCD.d){
	    	  _data+='d';
	      }
	      return _data;
	}

	$('.p2-jr').click(function(){
		//_popMsg("考试暂未开始");
        //return;
        $(".p2").hide();
        $(".tktip").fadeIn(600);

	});
	$('.p3-jr').click(function(){
		$(".p3").hide();
		$(".p2").fadeIn(800);
	});

	
	var _pduanData=[];
    var _curTiId=1;
    var _pduanVal='';
    $(".go-pduan").click(function(){
        $(".pduan-t"+ _esShuffle[0]).show();
        _curTiId=_esShuffle[0];
        _NextTkId=1;
        _NextLock=true;
        var _zwen=chinanum(_NextTkId);  
		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/15）");
		$(".ti-timedj").html('15s');
        _tmTimeId=15;
		$(".pduantip").hide();
		_tmKeyCookie=[];
    	_tmValCookie=[];
        $(".panduan").fadeIn(function(){
        	_tmTMType='panduan';
         	TMcount();
        });
 
    });

    
    function _panduanGoNext(){
    	_NextLock=false;
		_NextTkId++;
		if(_NextTkId > 20){
			var _zwen=chinanum(20);  
			$(".ti-title").html("第"+_zwen+"题（"+20+"/20）");
		}else{
			var _zwen=chinanum(_NextTkId);  
			$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/20）");
	    }
		$(".pduan-li-a").attr("src","./img/a.png");
	    $(".pduan-li-b").attr("src","./img/b.png");
		$(".pduan-t"+ _esShuffle[_NextTkId-2]).hide();
		$(".pduan-t"+ _esShuffle[_NextTkId-1]).show();
		var _setArr={};
		_setArr[_esShuffle[_NextTkId-2]]=_pduanVal;
		_pduanData.push(_setArr);

		_tmKeyCookie.push(_esShuffle[_NextTkId-2]);
		_tmValCookie.push(_pduanVal);
		setKe('sz_tmData', _tmValCookie);
		setKe('sz_tmKey', _tmKeyCookie);
		
		_pduanVal='';
		if(21 == _NextTkId){
			_post_panduan();
            $(".end-pop").fadeIn();
            _tmTMType='stop';
    		_tmTimeId=0;
			console.log(_duoData);
	    }else{
	    	_tmTimeId=16;
	    	$(".ti-timedj").html('15s');
	    	window.setTimeout(function(){_NextLock=true;}, 10);
	    	if(false == _hasPostDuo){
	    		_post_duoxtm();
		    }
		}
    }

	$(".pduan-next").click(function(){
		if(false == _NextLock){return;}
		_panduanGoNext();
        
	});

	$(".pduan-li").click(function(){
	       var _id=$(this).attr("data-id");
	       $(".pduan-li-a").attr("src","./img/a.png");
	       $(".pduan-li-b").attr("src","./img/b.png");
	       if('y' == _id){
	    	   $(".pduan-li-a").attr("src","./img/a-r.png");
	    	   _pduanVal='y';
	       }
	       if('n' == _id){
	    	   $(".pduan-li-b").attr("src","./img/b-r.png");
	    	   _pduanVal='n';
	       }
	});

	
    if(!('placeholder' in document.createElement('input')) ){   
	    $('input[placeholder],textarea[placeholder]').each(function(){var that = $(this),text= that.attr('placeholder');   
	      if(that.val()===""){that.val(text).addClass('placeholder');}   
	      that.focus(function(){if(that.val()===text){that.val("").removeClass('placeholder');}})   
	      .blur(function(){if(that.val()===""){that.val(text).addClass('placeholder');}})   
	      .closest('form').submit(function(){   
	        if(that.val() === text){that.val('');}});});   
	}
	$(".weui-btn").click(function(){
        $(".js_dialog").hide();
	});

	function getByteLen(val) {
        var len = 0;
        for (var i = 0; i < val.length; i++) {
            var a = val.charAt(i);
            if (a.match(/[^\x00-\xff]/ig) != null) {//\x00-\xff→GBK双字节编码范围
                len += 2;
            }
            else {
                len += 1;
            }
        }
        return len;
    }
	$('.go-tkong').click(function(){
		_NextTkId=1;
        $(".tktip").hide();
        setKe('sz_tmData', []);
		setKe('sz_tmKey', []);
        $(".tkong").fadeIn(function(){
        	_tmTMType='tkong';
        	TMcount();
         });
	});

	$('.end-pop-close').click(function(){
        if(false == _hasPostPan){
        	_post_panduan();
    	}
		_popMsg("考试已完成");
        return; 
	});

	function _popMsg(msg){
		$(".weui-msg").html(msg);
        $(".js_dialog").show();
	}

	$('.tktxt').bind('input propertychange', function() {
        var $this = $(this);
        var text_length = getByteLen($this.val());//获取当前文本框的长度
        if(sWidth > 720){
        	var current_width = parseInt(text_length/2) *18;
        	current_width=current_width+18;
        }else{
        	var current_width = parseInt(text_length/2) *12;
        	current_width=current_width+12;
        }
        if(current_width > _rate*60){
        	$this.css("width",current_width+"px");
        }
    });


	
	

	if(_szuid !='' && _szvtd !=''){
		if('' == _userCurStepCookie){
			$(".p1").hide();
	    	$(".p3").show();
		}
		var _tmDataStoreCookie=getke('sz_tmData');
		var _tmKeyStoreCookie=getke('sz_tmKey');
		if('tkong' == _userCurStepCookie){
			if("" != _tmDataStoreCookie){
				var _tmpTmData=_tmDataStoreCookie.split(",");
				var _tmpTmKey=_tmKeyStoreCookie.split(",");
				_tkData=[];
				_NextTkId=1;
				for(var _i=0;_i<_tmpTmData.length;_i++){
					var _setArr={};
					_setArr[_tmpTmKey[_i]]=_tmpTmData[_i];
			        _tkData.push(_setArr);
			        _NextTkId++;
			        _tmKeyCookie.push(_tmpTmKey[_i]);
			        _tmValCookie.push(_tmpTmData[_i]);
				}
				_tmTMType='tkong';
				$(".tk-t"+_esShuffle[0]).hide();
	        	TMcount();

	        	var _zwen=chinanum(_NextTkId);  
	    		$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/20）");
	    		$(".tk-t"+ _esShuffle[_NextTkId-1] ).show();
	    		_setKeyUp(_esShuffle[_NextTkId-1],_NextTkId);
				$(".p1").hide();
		    	$(".tkong").show();
		    }else{
		    	$(".p1").hide();
		    	$(".tktip").show();
		    }
		}
		if('dxtm' == _userCurStepCookie){
			if("" != _tmDataStoreCookie){
				var _tmpTmData=_tmDataStoreCookie.split(",");
				var _tmpTmKey=_tmKeyStoreCookie.split(",");
				_dxData=[];
				_NextTkId=1;
				for(var _i=0;_i<_tmpTmData.length;_i++){
					var _setArr={};
					_setArr[_tmpTmKey[_i]]=_tmpTmData[_i];
					_dxData.push(_setArr);
			        _NextTkId++;
			        _tmKeyCookie.push(_tmpTmKey[_i]);
			        _tmValCookie.push(_tmpTmData[_i]);
				}
				_tmTMType='danxt';
			    _curTiId=_sisShuffle[_NextTkId-1];
			    $(".dx-t"+ _sisShuffle[_NextTkId-1]).show();
			    var _zwen=chinanum(_NextTkId);  
				$(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/40）");
				window.setTimeout(function(){_NextLock=true;}, 100);
		        $(".ti-timedj").html('15s');
		        _tmTimeId=15;
		        TMcount();
				$(".p1").hide();
		    	$(".danxt").show();
		
			}else{
				$(".p1").hide();
		    	$(".dxtip").show();

		    }
			_hasPostTkong=true;
			
		}
		if('duoxtm' == _userCurStepCookie){
			if("" != _tmDataStoreCookie){
				var _tmpTmData=_tmDataStoreCookie.split(",");
				var _tmpTmKey=_tmKeyStoreCookie.split(",");
				_duoData=[];
				_NextTkId=1;
				for(var _i=0;_i<_tmpTmData.length;_i++){
					var _setArr={};
					_setArr[_tmpTmKey[_i]]=_tmpTmData[_i];
					_duoData.push(_setArr);
			        _NextTkId++;
			        _tmKeyCookie.push(_tmpTmKey[_i]);
			        _tmValCookie.push(_tmpTmData[_i]);
				}

				$(".duox-t"+ _esShuffle[_NextTkId-2]).hide();
				
				_tmTMType='duoxt';
				_curTiId=_esShuffle[_NextTkId-1];
			    $(".duox-t"+_esShuffle[_NextTkId]).show();
			    var _zwen=chinanum(_NextTkId);  
			    $(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/20）");
		        $(".ti-timedj").html('20s');
		        _tmTimeId=20;
		        TMcount();

				$(".p1").hide();
		    	$(".duoxt").show();
			}else{
				$(".p1").hide();
		    	$(".duotip").show();
			}
			_hasPostTkong=true;
			_hasPostDan=true;
		}
		if('pduan' == _userCurStepCookie){

			if("" != _tmDataStoreCookie){
				var _tmpTmData=_tmDataStoreCookie.split(",");
				var _tmpTmKey=_tmKeyStoreCookie.split(",");
				_pduanData=[];
				_NextTkId=1;
				for(var _i=0;_i<_tmpTmData.length;_i++){
					var _setArr={};
					_setArr[_tmpTmKey[_i]]=_tmpTmData[_i];
					_pduanData.push(_setArr);
			        _NextTkId++;
			        _tmKeyCookie.push(_tmpTmKey[_i]);
			        _tmValCookie.push(_tmpTmData[_i]);
				}

				_tmTMType='panduan';
				$(".pduan-t"+ _esShuffle[_NextTkId]).show();
			    var _zwen=chinanum(_NextTkId);  
			    $(".ti-title").html("第"+_zwen+"题（"+_NextTkId+"/15）");
		        $(".ti-timedj").html('15s');
		        _tmTimeId=15;
		        TMcount();
				$(".p1").hide();
		    	$(".panduan").show();
			}else{
				$(".p1").hide();
		    	$(".pduantip").show();
		    }
			_hasPostTkong=true;
			_hasPostDan=true;
			_hasPostDuo=true;
		}
		if('isend' == _userCurStepCookie){
			var _zwen=chinanum(20);  
			$(".ti-title").html("第"+_zwen+"题（"+20+"/20）");
			$(".p1").hide();
	    	$(".panduan, .end-pop").show();
		}
		$.post("./api/?c=getuid", {vtd:_szvtd,uid:_szuid}, function(data){
            if('n' == data.s){
            	$(".p1").show();
    	    	$(".p3, .tktip, .dxtip, .duotip, .pduantip").hide();
    	    	$(".panduan, .end-pop").hide();
            }
            if('y' == data.s){
                $('.p2-qu').html(data.u.qu);
            	$('.p2-school').html(data.u.school);
            	$('.p2-nianji').html(data.u.nianji);
            	$('.p2-name').html(data.u.name);
            	$('.p2-id').html(data.u.idcard);
            	$('.p2-phone').html(data.u.phone);
            }
 	   }, "json");
    }

	var _ttuwidth=_rate*535;
	function countTime(){
		var date = new Date();  
		var now = date.getTime();
		var leftTime = end-now; 
		var m,s; 
		if (leftTime >= 0){
			m = Math.floor(leftTime/1000/60%60);
			s = Math.floor(leftTime/1000%60);
			var _tmpS=':'+s;
			if(s<10){
				_tmpS=':0'+s;
			}
			console.log(leftTime);
			var _percent=1 - leftTime/1799898 + 0.02;
			if(_percent>1){_percent=1;}
			$('.tkong-t2').width(_ttuwidth*_percent); 
			$(".ti-timedt").html(m + _tmpS );
			setTimeout(countTime,1000); 
		}else{
		  $(".ti-timedt").html("00:00");
		  if('tkong' == _userCurStepCookie){
			  _post_tkong();
		  }
		  if('dxtm' == _userCurStepCookie){_post_dxtm();}
		  if('duoxtm' == _userCurStepCookie){_post_duoxtm();}
		  if('pduan' == _userCurStepCookie){_post_panduan();}
		  
		  $(".end-pop").fadeIn();
          _tmTMType='stop';
  		_tmTimeId=0;
  		setKe('sz_userCurStep', 'isend');
		  console.log('end');
		}
	}
	countTime();
	_setKeyUp(_lastTiId,1);
	function _setKeyUp(_lastTiId,_curId){
		return;
		var _tktClassId=".tk-t"+_curId;
		var _reg = /^[A-Za-z]+$/;
		var _inputOrder=1;
		var _numZi=$(".tk-t"+_curId).attr("data-n");
		console.log('is'+_numZi);

		if(_isMobile){
			 return;
		}
		$(_tktClassId+" .tk-txt1").keyup(function(){
			_inputOrder=1;
	        var _length=$(_tktClassId+" .tk-txt1").val().length;
	        var _val = $(_tktClassId+" .tk-txt1").val();
            if(false == _isMobile){
            	if (_reg.test(_val)) {
    	        	$(_tktClassId+" .tk-txt1").focus(); 
    	        	return false;
    	        }
            }
	        if(_length > 0){
	        	$(_tktClassId+" .tk-txt2").focus(); 
	        }else{
	        	$(_tktClassId+" .tk-txt1").focus(); 
	        }
	    });
		$(_tktClassId+" .tk-txt2").keyup(function(){
	    	var _length=$(_tktClassId+" .tk-txt2").val().length;
	    	var _val = $(_tktClassId+" .tk-txt2").val();
	    	if(false == _isMobile){
    	    	if (_reg.test(_val)) {
    	        	$(_tktClassId+" .tk-txt2").focus(); 
    	        	return false;
    	        }
	    	}
	    	console.log(_inputOrder);
	        if('' == _val && 1 == _inputOrder){
	        	return false;
		    }
		    console.log('num:'+_numZi);
	        if(2 == _numZi){
		    	_inputOrder=2; 
    		}else{
    			_inputOrder=1; 
        	}
	    	if(_length > 0){
		    	if(_numZi > 2){
		    		$(_tktClassId+" .tk-txt3").focus(); 
			    }
	        }else{
	        	$(_tktClassId+"  .tk-txt1").focus(); 
	        }
	        
	    });
		if(_numZi > 2){
    		$(_tktClassId+" .tk-txt3").keyup(function(){
    	    	var _length=$(_tktClassId+" .tk-txt3").val().length;
    	    	var _val = $(_tktClassId+" .tk-txt3").val();
    	    	if('' == _val && 1 == _inputOrder){
    	        	return false;
    		    }
    	    	if(_numZi > 3){
    	    		if(false == _isMobile){
        	    		if (_reg.test(_val)) {
            	        	$(_tktClassId+" .tk-txt3").focus(); 
            	        	return false;
            	        }
    	    		}
        	    }
    	    	if(3 == _numZi){
    		    	_inputOrder=2; 
        		}else{
        			_inputOrder=1; 
            	}
    	    	console.log('3:'+_length);
    	    	if(0 == _length){
    	    		$(_tktClassId+"  .tk-txt2").focus(); 
    	        }
    	    	if(_length > 0){
    		    	if(_numZi > 3){
    		    		$(_tktClassId+" .tk-txt4").focus(); 
    			    }
    	        }
    	    });
		}
		if(_numZi > 3){
			$(_tktClassId+" .tk-txt4").keyup(function(){
    	    	var _length=$(_tktClassId+" .tk-txt4").val().length;
    	    	var _val = $(_tktClassId+" .tk-txt4").val();
    	    	if('' == _val && 1 == _inputOrder){
    	        	return false;
    		    }
    	    	if(_numZi > 4){
    	    		if (_reg.test(_val)) {
        	        	$(_tktClassId+" .tk-txt4").focus(); 
        	        	return false;
        	        }
        	    }
    		    
    		    if(4 == _numZi){
    		    	_inputOrder=2; 
        		}else{
        			_inputOrder=1; 
            	}
    	    	if(0 == _length){
    	    		$(_tktClassId+"  .tk-txt3").focus(); 
    	        }
    	    	if(_length > 0){
    		    	if(_numZi > 4){
    		    		$(_tktClassId+" .tk-txt5").focus(); 
    			    }
    	        }
    	    });
		}
		if(_numZi > 4){
			$(_tktClassId+" .tk-txt5").keyup(function(){
    	    	var _length=$(_tktClassId+" .tk-txt5").val().length;
    	    	var _val = $(_tktClassId+" .tk-txt5").val();
    	    	if('' == _val && 1 == _inputOrder){
    	        	return false;
    		    }
    	    	if(_numZi > 5){
    	    		if (_reg.test(_val)) {
        	        	$(_tktClassId+" .tk-txt5").focus(); 
        	        	return false;
        	        }
        	    }
    		    if(5 == _numZi){
    		    	_inputOrder=2; 
        		}else{
        			_inputOrder=1; 
            	}
    	    	if(0 == _length){
    	    		$(_tktClassId+"  .tk-txt4").focus(); 
    	        }
    	    	if(_length > 0){
    		    	if(_numZi > 5){
    		    		$(_tktClassId+" .tk-txt6").focus(); 
    			    }
    	        }
    	    });
		}
		if(_numZi > 5){
			$(_tktClassId+" .tk-txt6").keyup(function(){
    	    	var _length=$(_tktClassId+" .tk-txt6").val().length;
    	    	var _val = $(_tktClassId+" .tk-txt6").val();
    	    	if('' == _val && 1 == _inputOrder){
    	        	return false;
    		    }
    		    if(6 == _numZi){
    		    	_inputOrder=2; 
        		}else{
        			_inputOrder=1; 
            	}
    	    	if(0 == _length){
    	    		$(_tktClassId+"  .tk-txt5").focus(); 
    	        }
    	    });
		}
		
    }

	
	if(sWidth > 700){
		$('.container').css({"margin-top":'-20%',"transform": 'scale(0.75,0.75)'});
		$('.ti-title').css({"top":_rate*260});
		$('.tk-bt').css({"top":_rate*460});
		$('.pduan-bt').css({"top":_rate*340});
		$('.dx-bt').css({"top":_rate*340});
		$('.duox-bt').css({"top":_rate*340});
		$('.dx-abcd, .pduan-abcd').css({"top":_rate*550});
		$('.duox-abcd').css({"top":_rate*550});
	}
    
});
</script>
</body>
</html>